<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
  <title>tango.io.Path</title>
  <link href="./css/style.css" rel="stylesheet" type="text/css"/>
  <!-- <link href="./img/icon.png" rel="icon" type="image/png"/> -->
  <script type="text/javascript" src="./js/jquery.js"></script>
  <script type="text/javascript" src="./js/modules.js"></script>
  <script type="text/javascript" src="./js/quicksearch.js"></script>
  <script type="text/javascript" src="./js/navigation.js"></script>
  <!--<script type="text/javascript" src="./js/jquery.treeview.js"></script>-->
  <script type="text/javascript">
    var g_moduleFQN = "tango.io.Path";
  </script>
  
</head>
<body>
<div id="content">
  <h1><a href="./htmlsrc/tango.io.Path.html" class="symbol">tango.io.Path</a></h1>
  
<p class="sec_header">License:</p>BSD style: see <a href="http://www.dsource.org/projects/tango/wiki/LibraryLicense">license.txt</a>
<p class="sec_header">Version:</p>Mar 2008: Initial version
<p class="sec_header">Author:</p>Kris
<p class="bl"/>
        A more direct route to the file-system than FilePath, but with 
        the potential overhead of heap activity. Use this if you don't
        need path editing features. For example, if all you want is to 
        see if some path exists, using this module would likely be more 
        convenient than FilePath. For example:
        <pre class="d_code">
<span class="k">if</span> (<span class="i">exists</span> (<span class="sl">"some/file/path"</span>)) 
    ...
</pre>
<p class="bl"/>
        These functions may be less efficient than FilePath because they 
        may have to attach a null to the filename for each underlying O/S
        call. Use Path when you need pedestrian access to the file-system, 
        and are not manipulating the path components. Use FilePath where
        path editing or mutation is desired.
<p class="bl"/>
        We encourage the use of "scoped import" with this module, such as
        <pre class="d_code">
<span class="k">import</span> <span class="i">Path</span> = <span class="i">tango</span>.<span class="i">io</span>.<span class="i">Path</span>;

<span class="k">if</span> (<span class="i">Path</span>.<span class="i">exists</span> (<span class="sl">"some/file/path"</span>)) 
    ...
</pre>
<p class="bl"/>
        Also residing here is a lightweight path-parser, which splits a filepath
        into constituent components. See PathParser below:
        <pre class="d_code">
<span class="k">auto</span> <span class="i">p</span> = <span class="i">Path</span>.<span class="i">parse</span> (<span class="sl">"some/file/path"</span>);
<span class="k">auto</span> <span class="i">path</span> = <span class="i">p</span>.<span class="i">path</span>;
<span class="k">auto</span> <span class="i">name</span> = <span class="i">p</span>.<span class="i">name</span>;
<span class="k">auto</span> <span class="i">suffix</span> = <span class="i">p</span>.<span class="i">suffix</span>;
...
...
</pre>
<p class="bl"/>
        Compile with -version=Win32SansUnicode to enable Win95 &amp; Win32s file
        support.
<dl>
<dt class="decl">struct <a class="symbol _struct" name="FS" href="./htmlsrc/tango.io.Path.html#L99" kind="struct" beg="99" end="904">FS</a>; <span class="attrs">[<span class="prot">package</span>]</span> <a title="Permalink to this symbol" href="#FS" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/tango.io.Path.html#L99">#</a></dt>
<dd class="ddef">
<div class="summary">Wraps the O/S specific calls with a D API. Note that these accept
        null-terminated strings only, which is why it's not public. We need 
        this declared first to avoid forward-reference issues</div>
<dl>
<dt class="decl">struct <a class="symbol _struct" name="FS.Stamps" href="./htmlsrc/tango.io.Path.html#L107" kind="struct" beg="107" end="112">Stamps</a>; <a title="Permalink to this symbol" href="#FS.Stamps" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/tango.io.Path.html#L107">#</a></dt>
<dd class="ddef">
<div class="summary">TimeStamp information. Accurate to whatever the F/S supports</div>
<dl>
<dt class="decl">Time <a class="symbol _variable" name="FS.Stamps.created" href="./htmlsrc/tango.io.Path.html#L109" kind="variable" beg="109" end="111">created</a>; <a title="Permalink to this symbol" href="#FS.Stamps.created" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/tango.io.Path.html#L109">#</a></dt>
<dt class="decl">Time <a class="symbol _variable" name="FS.Stamps.accessed" href="./htmlsrc/tango.io.Path.html#L109" kind="variable" beg="109" end="111">accessed</a>; <a title="Permalink to this symbol" href="#FS.Stamps.accessed" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/tango.io.Path.html#L109">#</a></dt>
<dt class="decl">Time <a class="symbol _variable" name="FS.Stamps.modified" href="./htmlsrc/tango.io.Path.html#L109" kind="variable" beg="109" end="111">modified</a>; <a title="Permalink to this symbol" href="#FS.Stamps.modified" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/tango.io.Path.html#L109">#</a></dt>
<dd class="ddef">
<div class="summary">last time modified</div></dd></dl></dd>
<dt class="decl">struct <a class="symbol _struct" name="FS.FileInfo" href="./htmlsrc/tango.io.Path.html#L120" kind="struct" beg="120" end="126">FileInfo</a>; <a title="Permalink to this symbol" href="#FS.FileInfo" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/tango.io.Path.html#L120">#</a></dt>
<dd class="ddef">
<div class="summary">Passed around during file-scanning</div>
</dd>
<dt class="decl">struct <a class="symbol _struct" name="FS.Listing" href="./htmlsrc/tango.io.Path.html#L134" kind="struct" beg="134" end="152">Listing</a>; <a title="Permalink to this symbol" href="#FS.Listing" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/tango.io.Path.html#L134">#</a></dt>
<dd class="ddef">
<div class="summary">Some fruct glue for directory listings</div>
</dd>
<dt class="decl">void <a class="symbol _function" name="FS.exception" href="./htmlsrc/tango.io.Path.html#L160" kind="function" beg="160" end="163">exception</a><span class="params">(char[] <em>filename</em>)</span>; <span class="attrs">[<span class="stc">static</span>]</span> <a title="Permalink to this symbol" href="#FS.exception" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/tango.io.Path.html#L160">#</a></dt>
<dd class="ddef">
<div class="summary">Throw an exception using the last known error</div></dd>
<dt class="decl">void <a class="symbol _function" name="FS.exception:2" href="./htmlsrc/tango.io.Path.html#L171" kind="function" beg="171" end="174">exception</a><span class="params">(char[] <em>prefix</em>, char[] <em>error</em>)</span>; <span class="attrs">[<span class="stc">static</span>]</span> <a title="Permalink to this symbol" href="#FS.exception:2" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/tango.io.Path.html#L171">#</a></dt>
<dd class="ddef">
<div class="summary">Throw an IO exception</div></dd>
<dt class="decl">char[] <a class="symbol _function" name="FS.padded" href="./htmlsrc/tango.io.Path.html#L183" kind="function" beg="183" end="188">padded</a><span class="params">(char[] <em>path</em>, char <em>c</em> = '/')</span>; <span class="attrs">[<span class="stc">static</span>]</span> <a title="Permalink to this symbol" href="#FS.padded" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/tango.io.Path.html#L183">#</a></dt>
<dd class="ddef">
<div class="summary">Return an adjusted path such that non-empty instances always
                have a trailing separator</div></dd>
<dt class="decl">char[] <a class="symbol _function" name="FS.stripped" href="./htmlsrc/tango.io.Path.html#L197" kind="function" beg="197" end="202">stripped</a><span class="params">(char[] <em>path</em>, char <em>c</em> = '/')</span>; <span class="attrs">[<span class="stc">static</span>]</span> <a title="Permalink to this symbol" href="#FS.stripped" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/tango.io.Path.html#L197">#</a></dt>
<dd class="ddef">
<div class="summary">Return an adjusted path such that non-empty instances do not
                have a trailing separator</div></dd>
<dt class="decl">char[] <a class="symbol _function" name="FS.join" href="./htmlsrc/tango.io.Path.html#L211" kind="function" beg="211" end="219">join</a><span class="params">(char[][] <em>paths</em>...)</span>; <span class="attrs">[<span class="stc">static</span>]</span> <a title="Permalink to this symbol" href="#FS.join" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/tango.io.Path.html#L211">#</a></dt>
<dd class="ddef">
<div class="summary">Join a set of path specs together. A path separator is
                potentially inserted between each of the segments.</div></dd>
<dt class="decl">char[] <a class="symbol _function" name="FS.strz" href="./htmlsrc/tango.io.Path.html#L228" kind="function" beg="228" end="236">strz</a><span class="params">(char[] <em>src</em>, char[] <em>dst</em>)</span>; <span class="attrs">[<span class="stc">static</span>]</span> <a title="Permalink to this symbol" href="#FS.strz" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/tango.io.Path.html#L228">#</a></dt>
<dd class="ddef">
<div class="summary">Append a terminating null onto a string, cheaply where 
                feasible</div></dd></dl></dd>
<dt class="decl">struct <a class="symbol _struct" name="PathParser" href="./htmlsrc/tango.io.Path.html#L930" kind="struct" beg="930" end="1200">PathParser</a>; <a title="Permalink to this symbol" href="#PathParser" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/tango.io.Path.html#L930">#</a></dt>
<dd class="ddef">
<div class="summary">Parse a file path</div>
File paths containing non-ansi characters should be UTF-8 encoded.
        Supporting Unicode in this manner was deemed to be more suitable
        than providing a wchar version of PathParser, and is both consistent
        &amp; compatible with the approach taken with the Uri class.
<p class="bl"/>
        Note that patterns of adjacent '.' separators are treated specially
        in that they will be assigned to the name where there is no distinct
        suffix. In addition, a '.' at the start of a name signifies it does 
        not belong to the suffix i.e. ".file" is a name rather than a suffix.
        Patterns of intermediate '.' characters will otherwise be assigned
        to the suffix, such that "file....suffix" includes the dots within
        the suffix itself [see ext() for a suffix without dots].
<p class="bl"/>
        Note also that normalization of path-separators occurs by default. 
        This means that the use of '\' characters will be converted into
        '/' instead while parsing.
<dl>
<dt class="decl">PathParser <a class="symbol _function" name="PathParser.parse" href="./htmlsrc/tango.io.Path.html#L945" kind="function" beg="945" end="948">parse</a><span class="params">(char[] <em>path</em>)</span>; <a title="Permalink to this symbol" href="#PathParser.parse" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/tango.io.Path.html#L945">#</a></dt>
<dd class="ddef">
<div class="summary">Parse the path spec</div></dd>
<dt class="decl">PathParser <a class="symbol _function" name="PathParser.dup" href="./htmlsrc/tango.io.Path.html#L956" kind="function" beg="956" end="961">dup</a><span class="params">()</span>; <a title="Permalink to this symbol" href="#PathParser.dup" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/tango.io.Path.html#L956">#</a></dt>
<dd class="ddef">
<div class="summary">Duplicate this path</div></dd>
<dt class="decl">char[] <a class="symbol _function" name="PathParser.toString" href="./htmlsrc/tango.io.Path.html#L969" kind="function" beg="969" end="972">toString</a><span class="params">()</span>; <a title="Permalink to this symbol" href="#PathParser.toString" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/tango.io.Path.html#L969">#</a></dt>
<dd class="ddef">
<div class="summary">Return the complete text of this filepath</div></dd>
<dt class="decl">char[] <a class="symbol _function" name="PathParser.root" href="./htmlsrc/tango.io.Path.html#L981" kind="function" beg="981" end="984">root</a><span class="params">()</span>; <a title="Permalink to this symbol" href="#PathParser.root" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/tango.io.Path.html#L981">#</a></dt>
<dd class="ddef">
<div class="summary">Return the root of this path. Roots are constructs such as
                "c:"</div></dd>
<dt class="decl">char[] <a class="symbol _function" name="PathParser.folder" href="./htmlsrc/tango.io.Path.html#L996" kind="function" beg="996" end="999">folder</a><span class="params">()</span>; <a title="Permalink to this symbol" href="#PathParser.folder" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/tango.io.Path.html#L996">#</a></dt>
<dd class="ddef">
<div class="summary">Return the file path. Paths may start and end with a "/".
                The root path is "/" and an unspecified path is returned as
                an empty string. Directory paths may be split such that the
                directory name is placed into the 'name' member; directory
                paths are treated no differently than file paths</div></dd>
<dt class="decl">char[] <a class="symbol _function" name="PathParser.parent" href="./htmlsrc/tango.io.Path.html#L1017" kind="function" beg="1017" end="1028">parent</a><span class="params">()</span>; <a title="Permalink to this symbol" href="#PathParser.parent" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/tango.io.Path.html#L1017">#</a></dt>
<dd class="ddef">
<div class="summary">Returns a path representing the parent of this one. This
                will typically return the current path component, though
                with a special case where the name component is empty. In 
                such cases, the path is scanned for a prior segment:
                <pre class="d_code">
<span class="i">normal</span>:  /<span class="i">x</span>/<span class="i">y</span>/<span class="i">z</span> =&gt; /<span class="i">x</span>/<span class="i">y</span>
<span class="i">special</span>: /<span class="i">x</span>/<span class="i">y</span>/  =&gt; /<span class="i">x</span>
</pre></div>
Note that this returns a path suitable for splitting into
                path and name components (there's no trailing separator).</dd>
<dt class="decl">char[] <a class="symbol _function" name="PathParser.name" href="./htmlsrc/tango.io.Path.html#L1036" kind="function" beg="1036" end="1039">name</a><span class="params">()</span>; <a title="Permalink to this symbol" href="#PathParser.name" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/tango.io.Path.html#L1036">#</a></dt>
<dd class="ddef">
<div class="summary">Return the name of this file, or directory.</div></dd>
<dt class="decl">char[] <a class="symbol _function" name="PathParser.ext" href="./htmlsrc/tango.io.Path.html#L1050" kind="function" beg="1050" end="1064">ext</a><span class="params">()</span>; <a title="Permalink to this symbol" href="#PathParser.ext" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/tango.io.Path.html#L1050">#</a></dt>
<dd class="ddef">
<div class="summary">Ext is the tail of the filename, rightward of the rightmost
                '.' separator e.g. path "foo.bar" has ext "bar". Note that
                patterns of adjacent separators are treated specially - for
                example, ".." will wind up with no ext at all</div></dd>
<dt class="decl">char[] <a class="symbol _function" name="PathParser.suffix" href="./htmlsrc/tango.io.Path.html#L1073" kind="function" beg="1073" end="1076">suffix</a><span class="params">()</span>; <a title="Permalink to this symbol" href="#PathParser.suffix" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/tango.io.Path.html#L1073">#</a></dt>
<dd class="ddef">
<div class="summary">Suffix is like ext, but includes the separator e.g. path
                "foo.bar" has suffix ".bar"</div></dd>
<dt class="decl">char[] <a class="symbol _function" name="PathParser.path" href="./htmlsrc/tango.io.Path.html#L1084" kind="function" beg="1084" end="1087">path</a><span class="params">()</span>; <a title="Permalink to this symbol" href="#PathParser.path" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/tango.io.Path.html#L1084">#</a></dt>
<dd class="ddef">
<div class="summary">return the root + folder combination</div></dd>
<dt class="decl">char[] <a class="symbol _function" name="PathParser.file" href="./htmlsrc/tango.io.Path.html#L1095" kind="function" beg="1095" end="1098">file</a><span class="params">()</span>; <a title="Permalink to this symbol" href="#PathParser.file" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/tango.io.Path.html#L1095">#</a></dt>
<dd class="ddef">
<div class="summary">return the name + suffix combination</div></dd>
<dt class="decl">bool <a class="symbol _function" name="PathParser.isAbsolute" href="./htmlsrc/tango.io.Path.html#L1107" kind="function" beg="1107" end="1111">isAbsolute</a><span class="params">()</span>; <a title="Permalink to this symbol" href="#PathParser.isAbsolute" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/tango.io.Path.html#L1107">#</a></dt>
<dd class="ddef">
<div class="summary">Returns true if this path is *not* relative to the
                current working directory</div></dd>
<dt class="decl">bool <a class="symbol _function" name="PathParser.isEmpty" href="./htmlsrc/tango.io.Path.html#L1119" kind="function" beg="1119" end="1122">isEmpty</a><span class="params">()</span>; <a title="Permalink to this symbol" href="#PathParser.isEmpty" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/tango.io.Path.html#L1119">#</a></dt>
<dd class="ddef">
<div class="summary">Returns true if this FilePath is empty</div></dd>
<dt class="decl">bool <a class="symbol _function" name="PathParser.isChild" href="./htmlsrc/tango.io.Path.html#L1133" kind="function" beg="1133" end="1136">isChild</a><span class="params">()</span>; <a title="Permalink to this symbol" href="#PathParser.isChild" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/tango.io.Path.html#L1133">#</a></dt>
<dd class="ddef">
<div class="summary">Returns true if this path has a parent. Note that a
                parent is defined by the presence of a path-separator in
                the path. This means 'foo' within "/foo" is considered a
                child of the root</div></dd>
<dt class="decl">int <a class="symbol _function" name="PathParser.opEquals" href="./htmlsrc/tango.io.Path.html#L1144" kind="function" beg="1144" end="1147">opEquals</a><span class="params">(char[] <em>s</em>)</span>; <a title="Permalink to this symbol" href="#PathParser.opEquals" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/tango.io.Path.html#L1144">#</a></dt>
<dd class="ddef">
<div class="summary">Does this path equate to the given text?</div></dd>
<dt class="decl">PathParser <a class="symbol _function" name="PathParser.parse:2" href="./htmlsrc/tango.io.Path.html#L1155" kind="function" beg="1155" end="1199">parse</a><span class="params">(char[] <em>path</em>, uint <em>end</em>)</span>; <span class="attrs">[<span class="prot">package</span>]</span> <a title="Permalink to this symbol" href="#PathParser.parse:2" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/tango.io.Path.html#L1155">#</a></dt>
<dd class="ddef">
<div class="summary">Parse the path spec with explicit end point</div></dd></dl></dd>
<dt class="decl">bool <a class="symbol _function" name="exists" href="./htmlsrc/tango.io.Path.html#L1209" kind="function" beg="1209" end="1213">exists</a><span class="params">(char[] <em>name</em>)</span>; <a title="Permalink to this symbol" href="#exists" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/tango.io.Path.html#L1209">#</a></dt>
<dd class="ddef">
<div class="summary">Does this path currently exist?</div></dd>
<dt class="decl">Time <a class="symbol _function" name="modified" href="./htmlsrc/tango.io.Path.html#L1224" kind="function" beg="1224" end="1227">modified</a><span class="params">(char[] <em>name</em>)</span>; <a title="Permalink to this symbol" href="#modified" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/tango.io.Path.html#L1224">#</a></dt>
<dd class="ddef">
<div class="summary">Returns the time of the last modification. Accurate
        to whatever the F/S supports, and in a format dictated
        by the file-system. For example NTFS keeps UTC time, 
        while FAT timestamps are based on the local time.</div></dd>
<dt class="decl">Time <a class="symbol _function" name="accessed" href="./htmlsrc/tango.io.Path.html#L1238" kind="function" beg="1238" end="1241">accessed</a><span class="params">(char[] <em>name</em>)</span>; <a title="Permalink to this symbol" href="#accessed" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/tango.io.Path.html#L1238">#</a></dt>
<dd class="ddef">
<div class="summary">Returns the time of the last access. Accurate to
        whatever the F/S supports, and in a format dictated
        by the file-system. For example NTFS keeps UTC time, 
        while FAT timestamps are based on the local time.</div></dd>
<dt class="decl">Time <a class="symbol _function" name="created" href="./htmlsrc/tango.io.Path.html#L1252" kind="function" beg="1252" end="1255">created</a><span class="params">(char[] <em>name</em>)</span>; <a title="Permalink to this symbol" href="#created" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/tango.io.Path.html#L1252">#</a></dt>
<dd class="ddef">
<div class="summary">Returns the time of file creation. Accurate to
        whatever the F/S supports, and in a format dictated
        by the file-system. For example NTFS keeps UTC time,  
        while FAT timestamps are based on the local time.</div></dd>
<dt class="decl">ulong <a class="symbol _function" name="fileSize" href="./htmlsrc/tango.io.Path.html#L1263" kind="function" beg="1263" end="1267">fileSize</a><span class="params">(char[] <em>name</em>)</span>; <a title="Permalink to this symbol" href="#fileSize" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/tango.io.Path.html#L1263">#</a></dt>
<dd class="ddef">
<div class="summary">Return the file length (in bytes)</div></dd>
<dt class="decl">bool <a class="symbol _function" name="isWritable" href="./htmlsrc/tango.io.Path.html#L1275" kind="function" beg="1275" end="1279">isWritable</a><span class="params">(char[] <em>name</em>)</span>; <a title="Permalink to this symbol" href="#isWritable" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/tango.io.Path.html#L1275">#</a></dt>
<dd class="ddef">
<div class="summary">Is this file writable?</div></dd>
<dt class="decl">bool <a class="symbol _function" name="isFolder" href="./htmlsrc/tango.io.Path.html#L1287" kind="function" beg="1287" end="1291">isFolder</a><span class="params">(char[] <em>name</em>)</span>; <a title="Permalink to this symbol" href="#isFolder" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/tango.io.Path.html#L1287">#</a></dt>
<dd class="ddef">
<div class="summary">Is this file actually a folder/directory?</div></dd>
<dt class="decl">FS.Stamps <a class="symbol _function" name="timeStamps" href="./htmlsrc/tango.io.Path.html#L1303" kind="function" beg="1303" end="1307">timeStamps</a><span class="params">(char[] <em>name</em>)</span>; <a title="Permalink to this symbol" href="#timeStamps" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/tango.io.Path.html#L1303">#</a></dt>
<dd class="ddef">
<div class="summary">Return timestamp information</div>
Timstamps are returns in a format dictated by the 
        file-system. For example NTFS keeps UTC time, 
        while FAT timestamps are based on the local time</dd>
<dt class="decl">void <a class="symbol _function" name="remove" href="./htmlsrc/tango.io.Path.html#L1315" kind="function" beg="1315" end="1319">remove</a><span class="params">(char[] <em>name</em>)</span>; <a title="Permalink to this symbol" href="#remove" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/tango.io.Path.html#L1315">#</a></dt>
<dd class="ddef">
<div class="summary">Remove the file/directory from the file-system</div></dd>
<dt class="decl">void <a class="symbol _function" name="createFile" href="./htmlsrc/tango.io.Path.html#L1327" kind="function" beg="1327" end="1331">createFile</a><span class="params">(char[] <em>name</em>)</span>; <a title="Permalink to this symbol" href="#createFile" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/tango.io.Path.html#L1327">#</a></dt>
<dd class="ddef">
<div class="summary">Create a new file</div></dd>
<dt class="decl">void <a class="symbol _function" name="createFolder" href="./htmlsrc/tango.io.Path.html#L1339" kind="function" beg="1339" end="1343">createFolder</a><span class="params">(char[] <em>name</em>)</span>; <a title="Permalink to this symbol" href="#createFolder" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/tango.io.Path.html#L1339">#</a></dt>
<dd class="ddef">
<div class="summary">Create a new directory</div></dd>
<dt class="decl">void <a class="symbol _function" name="createPath" href="./htmlsrc/tango.io.Path.html#L1362" kind="function" beg="1362" end="1378">createPath</a><span class="params">(char[] <em>path</em>)</span>; <a title="Permalink to this symbol" href="#createPath" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/tango.io.Path.html#L1362">#</a></dt>
<dd class="ddef">
<div class="summary">Create an entire path consisting of this folder along with
        all parent folders. The path must not contain '.' or '..'
        segments. Related methods include PathUtil.normalize() and
        FileSystem.toAbsolute()</div>
Note that each segment is created as a folder, including the
        trailing segment.
<p class="sec_header">Throws:</p>IOException upon system errors
<p class="sec_header">Throws:</p>IllegalArgumentException if a segment exists but as a 
        file instead of a folder</dd>
<dt class="decl">void <a class="symbol _function" name="rename" href="./htmlsrc/tango.io.Path.html#L1386" kind="function" beg="1386" end="1391">rename</a><span class="params">(char[] <em>src</em>, char[] <em>dst</em>)</span>; <a title="Permalink to this symbol" href="#rename" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/tango.io.Path.html#L1386">#</a></dt>
<dd class="ddef">
<div class="summary">change the name or location of a file/directory</div></dd>
<dt class="decl">void <a class="symbol _function" name="copy" href="./htmlsrc/tango.io.Path.html#L1400" kind="function" beg="1400" end="1405">copy</a><span class="params">(char[] <em>src</em>, char[] <em>dst</em>)</span>; <a title="Permalink to this symbol" href="#copy" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/tango.io.Path.html#L1400">#</a></dt>
<dd class="ddef">
<div class="summary">Transfer the content of one file to another. Throws 
        an IOException upon failure.</div></dd>
<dt class="decl">FS.Listing <a class="symbol _function" name="children" href="./htmlsrc/tango.io.Path.html#L1428" kind="function" beg="1428" end="1431">children</a><span class="params">(char[] <em>path</em>)</span>; <a title="Permalink to this symbol" href="#children" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/tango.io.Path.html#L1428">#</a></dt>
<dd class="ddef">
<div class="summary">Provides foreach support via a fruct, as in
        <pre class="d_code">
<span class="k">foreach</span> (<span class="i">info</span>; <span class="i">children</span>(<span class="sl">"myfolder"</span>))
         ...
</pre></div>
Each path and filename is passed to the foreach
        delegate, along with the path prefix and whether
        the entry is a folder or not. The info construct
        exposes the following attributes:
        <pre class="d_code">
<span class="k">char</span>[]  <span class="i">path</span>
<span class="k">char</span>[]  <span class="i">name</span>
<span class="k">ulong</span>   <span class="i">bytes</span>
<span class="k">bool</span>    <span class="i">folder</span>
</pre></dd>
<dt class="decl">char[] <a class="symbol _function" name="join" href="./htmlsrc/tango.io.Path.html#L1440" kind="function" beg="1440" end="1443">join</a><span class="params">(char[][] <em>paths</em>...)</span>; <a title="Permalink to this symbol" href="#join" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/tango.io.Path.html#L1440">#</a></dt>
<dd class="ddef">
<div class="summary">Join a set of path specs together. A path separator is
        potentially inserted between each of the segments.</div></dd>
<dt class="decl">char[] <a class="symbol _function" name="standard" href="./htmlsrc/tango.io.Path.html#L1458" kind="function" beg="1458" end="1461">standard</a><span class="params">(char[] <em>path</em>)</span>; <a title="Permalink to this symbol" href="#standard" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/tango.io.Path.html#L1458">#</a></dt>
<dd class="ddef">
<div class="summary">Convert path separators to a standard format, using '/' as
        the path separator. This is compatible with Uri and all of 
        the contemporary O/S which Tango supports. Known exceptions
        include the Windows command-line processor, which considers
        '/' characters to be switches instead. Use the native()
        method to support that.</div>
<p class="sec_header">Note:</p>mutates the provided path.</dd>
<dt class="decl">char[] <a class="symbol _function" name="native" href="./htmlsrc/tango.io.Path.html#L1473" kind="function" beg="1473" end="1478">native</a><span class="params">(char[] <em>path</em>)</span>; <a title="Permalink to this symbol" href="#native" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/tango.io.Path.html#L1473">#</a></dt>
<dd class="ddef">
<div class="summary">Convert to native O/S path separators where that is required,
        such as when dealing with the Windows command-line.</div>
<p class="sec_header">Note:</p>mutates the provided path. Use this pattern to obtain a 
        copy instead: native(path.dup);</dd>
<dt class="decl">char[] <a class="symbol _function" name="pop" href="./htmlsrc/tango.io.Path.html#L1492" kind="function" beg="1492" end="1498">pop</a><span class="params">(char[] <em>path</em>)</span>; <a title="Permalink to this symbol" href="#pop" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/tango.io.Path.html#L1492">#</a></dt>
<dd class="ddef">
<div class="summary">Returns a path representing the parent of this one, with a special 
        case concerning a trailing '/':
        <pre class="d_code">
<span class="i">normal</span>:  /<span class="i">x</span>/<span class="i">y</span>/<span class="i">z</span> =&gt; /<span class="i">x</span>/<span class="i">y</span>
<span class="i">special</span>: /<span class="i">x</span>/<span class="i">y</span>/  =&gt; /<span class="i">x</span>
<span class="k">final</span>:   /<span class="i">x</span>     =&gt; <span class="i">empty</span>
</pre></div></dd>
<dt class="decl">char[] <a class="symbol _function" name="split" href="./htmlsrc/tango.io.Path.html#L1510" kind="function" beg="1510" end="1522">split</a><span class="params">(char[] <em>path</em>, out char[] <em>head</em>, out char[] <em>tail</em>)</span>; <a title="Permalink to this symbol" href="#split" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/tango.io.Path.html#L1510">#</a></dt>
<dd class="ddef">
<div class="summary">Break a path into "head" and "tail" components. For example: 
        <pre class="d_code">
<span class="sl">"/a/b/c"</span> -&gt; <span class="sl">"/a"</span>,<span class="sl">"b/c"</span> 
<span class="sl">"a/b/c"</span> -&gt; <span class="sl">"a"</span>,<span class="sl">"b/c"</span> 
</pre></div></dd>
<dt class="decl">char[] <a class="symbol _function" name="replace" href="./htmlsrc/tango.io.Path.html#L1531" kind="function" beg="1531" end="1537">replace</a><span class="params">(char[] <em>path</em>, char <em>from</em>, char <em>to</em>)</span>; <a title="Permalink to this symbol" href="#replace" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/tango.io.Path.html#L1531">#</a></dt>
<dd class="ddef">
<div class="summary">Replace all path 'from' instances with 'to', in place (overwrites
        the provided path)</div></dd>
<dt class="decl">PathParser <a class="symbol _function" name="parse" href="./htmlsrc/tango.io.Path.html#L1547" kind="function" beg="1547" end="1553">parse</a><span class="params">(char[] <em>path</em>)</span>; <a title="Permalink to this symbol" href="#parse" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/tango.io.Path.html#L1547">#</a></dt>
<dd class="ddef">
<div class="summary">Parse a path into its constituent components. 
        
        Note that the provided path is not duplicated</div></dd></dl>
</div>
<div id="footer">
  <p>Copyright (c) 2008 Kris Bell. All rights reserved</p>
  <p>Page generated by <a href="http://code.google.com/p/dil">dil</a> on Fri Dec 26 04:03:57 2008. Rendered by <a href="http://code.google.com/p/dil/wiki/Kandil">kandil</a>.</p>
</div>
</body>
</html>